<html>
    <head>
        <title>Test</title>
        <style></style>
        <script|module>

import * as rt from "@sciter";
import * as sys from "@sys";

(function() {
  
  let arrayBuffer = sys.fs.$readfile(URL.toPath(__DIR__ + "test.txt"));

  document.$("pre#original").innerText = rt.decode(arrayBuffer,"utf-8"); 

  let base64 = rt.toBase64(arrayBuffer);

  document.$("pre#base64").innerText = base64;

  document.$("pre#text").innerText = rt.decode(rt.fromBase64(base64),"utf-8"); 

})();

        </script>
    </head>
    <body>

original: 
<pre#original />
toBase64: 
<pre#base64 />
fromBase64: 
<pre#text />

    </body>
</html>